
	
		tinyMCE.init({
			mode : "textareas",
			editor_selector : "tiny",
			theme : "advanced",
			plugins : "advimage,advlink,media,contextmenu,fullscreen,table",
			theme_advanced_buttons1_add_before : "newdocument,separator",
			theme_advanced_buttons1_add : "fontselect,fontsizeselect",
			theme_advanced_buttons2_add : "separator,forecolor,backcolor,liststyle",
			theme_advanced_buttons2_add_before: "cut,copy,separator,",
			theme_advanced_buttons3_add_before : "tablecontrols,|,",
			theme_advanced_buttons3_add : "media,|,fullscreen",
			//theme_advanced_disable: "styleselect",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			extended_valid_elements : "hr[class|width|size|noshade]",
			
			//  http://wiki.moxiecode.com/index.php/TinyMCE:Plugins/table
			table_styles : "Tabla=tabla",
			table_cell_styles : "",
			table_row_styles : "",
			table_cell_limit : 100,
			table_row_limit : 5,
			table_col_limit : 5,

			theme_advanced_styles: "Izquierda=izquierda, Derecha=derecha, Renglon Completo=clearBoth",
			
			content_css : BASE_URL+"css/base.css",
			
			plugin_preview_width : "500",
			plugin_preview_height : "600",
			
			file_browser_callback : "ajaxfilemanager",
			paste_use_dialog : false,
			theme_advanced_resizing : true,
			theme_advanced_resize_horizontal : true,
			theme_advanced_statusbar_location : "bottom",
			apply_source_formatting : true,
			force_br_newlines : true,
			force_p_newlines : false,	
			relative_urls : false
			
		});

		function ajaxfilemanager(field_name, url, type, win) {
			var ajaxfilemanagerurl = "../../../tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php";
			switch (type) {
				case "image":
					break;
				case "media":
					break;
				case "flash": 
					break;
				case "file":
					break;
				default:
					return false;
			}
            tinyMCE.activeEditor.windowManager.open({
                url: "../../../tiny_mce/plugins/ajaxfilemanager/ajaxfilemanager.php",
                width: 782,
                height: 440,
                inline : "yes",
                close_previous : "no"
            },{
                window : win,
                input : field_name
            });
            
		}
